package com.example.myapplication.room;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

/**
 * 表
 */
@Entity
public class Student {

    @PrimaryKey(autoGenerate = true)//  主键唯一    自动增长
    private int id;

    @ColumnInfo(name = "student_name")
    private String name;


    @ColumnInfo(name = "student_age")
    private int age;

    public Student(String name,int age) {
        this.name = name;
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
